package com.example.pungolo.journal.model;

import java.util.Calendar;
import java.util.Date;

import android.view.ContextMenu.ContextMenuInfo;

public class DiaryEntry implements ContextMenuInfo {
  Mood mood;
  String text;
  Date date;

  /**
   * Creates a new instance of DiaryEntry with default values
   */
  public DiaryEntry() {
    mood = null;
    text = "";
    date = Calendar.getInstance().getTime();
  }
  
  public Mood getMood() {
    return mood;
  }
  
  public String getText() {
    return text;
  }
  
  public Date getDate() {
    return date;
  }
  
  public void setDate(Date date) {
    this.date = date;
  }
  
  public void setMood(Mood mood) {
    this.mood = mood;
  }
  
  public void setText(String text) {
    this.text = text;
  }
  
  public void save() {
	DiaryIO.getDatabase().saveDiaryEntry(this);
  }
}
